(function($){
	$(function(){
		var resizePage = (function () {
            $("body,.pop-page").height($(window).height());
            var ww = $(window).width(),
                wh = $("body").innerHeight(),
                popTopH = $(".pop-top").outerHeight(true),
                $popWrap = $(".pop-wrap");

            $popWrap.height(wh - popTopH);
            return arguments.callee;
        })();

        $(window).resize(resizePage);
		//关闭弹出层
        $(".close-pop").on("click",function(e){
        	e.stopPropagation();
        	window.parent.$.popHide();
        });
        
        //tab切换
        $(".second-menu")
        	.on("click",".menu-text",function(){
        		var showIndex = $(this).closest("li").index();
        		$(".menu-text").removeClass("on");
        		$(this).addClass("on");
        		$(".physics-text").hide();
        		$(".physics-text").eq(showIndex).show();
        	})
        
        //CPU使用状况
		drawRing({
			parent : document.getElementById("cpuPercent"),
			width : 80,
			radius : 35,
			arc : 5,
			percent : 100,
			color : ['#e8edf0' , '#ff6858'],
			textColor : '#ff6858',
			textSize : '16px',
			animated : true
		});
		
		//内存使用状况
		drawRing({
			parent : document.getElementById("memoryPercent"),
			width : 80,
			radius : 35,
			arc : 5,
			percent : 100,
			color : ['#e8edf0' , '#61d1bf'],
			textColor : '#61d1bf',
			textSize : '16px',
			animated : true
		});
		
		//硬盘使用状况
		drawRing({
			parent : document.getElementById("diskPercent"),
			width : 80,
			radius : 35,
			arc : 5,
			percent : 100,
			color : ['#e8edf0' , '#1dabff'],
			textColor : '#1dabff',
			textSize : '16px',
			animated : true
		});
	})
})(jQuery)
